home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Practico: Seleccion De Shareware
/
CD Practico: Seleccion de Shareware.iso
/
SOFCAS
/
UTIL
/
ACCESO2M.ZIP
/
ACCESO2M.ENG
next >
Wrap
Text File
|
1997-01-01
|
10KB
|
237 lines
=============================================================
ACCESO 2M
=============================================================
-------------------------------------------------------------
Index
-------------------------------------------------------------
0. Warranty limit
1. Registered trademarks
2. Introduction
3. Requirements
4. Use of ACCESO 2M
5. Frequently asked questions
6. Final words
-------------------------------------------------------------
0. Warranty limit
-------------------------------------------------------------
ACCESO 2M has been tested successfully in some
computers, but it's impossible to guarantee that it will work
fine in other computers with different configurations. Use at
your own risk.
ACCESO 2M is freeware and someone can use and copy it
provided that the executable keeps its original form and
provided that executable and documentation files will be
distributed together.
-------------------------------------------------------------
1. Registered trademarks
-------------------------------------------------------------
MS-DOS, WINDOWS and WINDOWS95 are registered trademarks
of Microsoft Corporation
DELPHI is a registered trademark of Borland Inc.
-------------------------------------------------------------
2. Introduction
-------------------------------------------------------------
You can use ACCESO 2M to extract files from 2M formatted
disks without leaving Windows95.
-------------------------------------------------------------
3. Requirements
-------------------------------------------------------------
This program has been created for using it under
Windows95, but the compiler used generates standard Windows
executables, so you can use ACCESO 2M with Windows 3.1 or
3.11 although it is ridiculous because 2M works perfectly
with them. ACCESO 2M requires 300Kb of free memory for
loading it, 64Kb of conventional memory for intermediate
transfer buffer and 15% of involved disk's capacity for
caching.
It's needed 2M loaded before enter Windows95 and been
using interrupt 40h. Supported versions of 2M are 2.1 and
3.0; These versions use interrupt 40 if 2M determines that
diskette access are made thought this interrupt. If this
weren't possible then try loading diskette relative drivers
or programs in a different order.
ACCESO 2M only works with 512 bytes per sector diskettes
(512 bytes per sector logical not necessary physical) and 1
sector per cluster; all 2MF formatted disks use this
parameters.
-------------------------------------------------------------
4. Use of ACCESO 2M
-------------------------------------------------------------
Use of ACCESO 2M is trivial and quite simple. It must be
said that no multiple file choice can be made and that the
diskette could be unreadable if it presents some error in the
system's zones (FAT, root directory) or in the subdirectory's
one.
-------------------------------------------------------------
5. Frequently asked questions
-------------------------------------------------------------
* Why is ACCESO 2M so long?
* What language did you use?
- Because it has been programmed using a visual language
and everybody knows how nice and simple is programming with
them and how big the executables are. For example, the code
and data associated with file control alone is 50Kb long.
Programming without visual control's help it would be small
but also much more difficult job.
- ACCESO 2M has been coded using Delphi with one small
assembler fragment.
* Why ACCESO 2M can't write on the disks?
* Will someday exist a version with this feature?
- Simply because disk access is made at sector level and
is quite boring seeking the FAT to obtain the sectors of a
file. Writing will be more tedious and the goal was coding
to get out of a jam not reprogramming MS-DOS file access
subroutines.
- Surely there will never exist a version that permited
writing 2M disks.
* What's the trick?
* How does ACCESO 2M work?
* How does ACCESO 2M interact with 2M?
- Well, the trick is quite simple. Windows95 use its
protected mode drivers for diskette access bypassing BIOS and
MS-DOS resident programs in the background, although these
programs continue in the conventional memory and are
completely accessible for calling without interrupts.
This is the trick, using DPMI's function "Simulate Real
Mode Call Far With Iret Frame" (Int 31h AX=0302h) with
interrupt 40h address and with an appropiate register
structure with the transfer address of the disk data to read
in conventional memory in a buffer we have allocated before
with GlobalDOSAlloc Windows function . After transfer we can
copy out the contents of the buffer to some memory directly
accessible by our program. This is, it's like calling
interrupt 40h in real or virtual86 mode with the pair of
instructions pushf/call far, and, by the way, this mechanist
can be used in a MS-DOS window with a program that use
interrupt 13h, that will be the interrupt 2M will use in this
conditions.
* Why not using interrupt 13h instead of 40h?
- Because Windows95 at loading changes interrupt 40h
vector pointing it to an instruction like "arpl ..." trying
to prevent programs calling interrupt 13h using pushf/call
far. The execution of arpl in virtual86 mode produce an
exception caught by Windows95 that continue the disk access
through its protected mode drivers and doesn't reflect
interrupt 13h or 40h to virtual86 mode. Calling interrupt 13h
with this process the result will be the same that if we used
normal diskette access.
* How do you determine 2M presence?
- I use the same trick described for calling interrupt
40h but with 2Fh and I look at conventional memory using
selectors obtained through DPMI's function "Segment to
Selector" (Int 31h AX=0002h), if any CiriSOFT complaint
program answers the request. By the way, Windows DPMI
Delphi's documentation discourages the use of these sort of
functions but I didn't find other way to obtain selectors
pointing to conventional memory and this method works and it
doesn't produce any disturb (At least I didn't find).
* Can I obtain the source code anywhere?
- No, you can't. Except 2M's access trick the rest of
the code is conventional programming with nothing special,
it's uncommented and without learning purposes.
* What's the cache?
- ACCESO 2M tries reading the diskette by whole tracks
for speeding the reading process (I consider a track the
portion of a cylinder that is over a head, that is, a 1440Kb
diskette has 80 cylinders and 160 tracks). A track organised
cache is used to keep last recently read tracks and with a
size of 15% of the whole disk capacity that supplies the
requested sector for reading functions.
If requested track is wrong it tries to read the
involved sector alone, if this one weren't possible an error
is reported and the running task is finished. This is the
reason because it's impossible reading a diskette with a bad
sector in the subdirectory area because we always to read the
whole directory tree.
-------------------------------------------------------------
6. Final words
-------------------------------------------------------------
+ This program is specially dedicated to Ciriaco García
de Celis, 2M author.
+ My english isn't quite good, sorry.